//
//  TwoTableViewCell.m
//  iNews
//
//  Created by lanou3g on 14-12-4.
//  Copyright (c) 2014年 张在青. All rights reserved.
//


//小cell 高度定110


#import "TwoTableViewCell.h"

@implementation TwoTableViewCell
-(void)dealloc
{
    [_imv release];
    [_titlelab release];
    [_typelab release];
    [_sizelab release];
    [super dealloc];
    
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self addAllViews];
    }
    return self;
}

-(void)addAllViews
{
    
    self.imv = [[[UIImageView alloc] initWithFrame:CGRectMake(6, 5, 90, 78)] autorelease];
    self.imv.backgroundColor = [UIColor grayColor];

    [self addSubview: self.imv];
    
//    UILabel *la = [[[UILabel alloc] initWithFrame:CGRectMake(6, 5, 90, 78)] autorelease];
//    la.text = @"iNews";
//    la.textAlignment = NSTextAlignmentCenter;
//    [self.imv addSubview: la];
    
    self.typelab =[[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.imv.frame)+10, CGRectGetMinY(self.imv.frame),205, CGRectGetHeight(self.imv.frame)/3)] autorelease];
    self.typelab.textAlignment = NSTextAlignmentLeft;
   self.titlelab.font = [UIFont systemFontOfSize:15];
    [self addSubview: self.typelab];
    
    
    self.titlelab = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.typelab.frame), CGRectGetMaxY(self.typelab.frame), CGRectGetWidth(self.typelab.frame),  CGRectGetHeight(self.typelab.frame))] autorelease];
    self.titlelab.font = [UIFont systemFontOfSize:13];
    [self addSubview:self.titlelab];
    
    
    self.sizelab = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.titlelab.frame), CGRectGetMaxY(self.titlelab.frame), CGRectGetWidth(self.titlelab.frame),  CGRectGetHeight(self.titlelab.frame))] autorelease];
    self.sizelab.font = [UIFont systemFontOfSize:12];
    [self addSubview:self.sizelab];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
